package ch06.home;

class Cat{
	String name;
	String color;
	void cry(String sound){
		System.out.println(name + "가 " + sound);
	}
	void sleep(){
		System.out.println(name + "가 ZZZ~");
	}
}

public class CatTest {
	public static void main(String[] args){
		Cat[] cat = new Cat[3];
		for(int i=0;i<cat.length;i++) cat[i] = new Cat();
		
		cat[0].name="헤롱이";
		cat[1].name="세콤이";
		cat[2].name="징징이";
		cat[0].color="갈색";
		cat[1].color="검정색";
		cat[2].color="힌색";
		
		cat[0].cry("야옹야옹");
		cat[1].sleep();
		cat[2].cry("징징");
	}
}